import angular from 'angular';
import template from './header.component.html';
import './header.component.scss';

class HeaderController {
  constructor($scope) {
    // 'ngInject';
    $scope.title = 'Header主标题';
    this.subTitle = '副标题';
  }

  showTitle() {
    console.log(this.title);
  }

  $onInit() {

  }

  $onChanges() {
  }

  $onDestroy() {
  }

  $postLink() {
  }
}

HeaderController.$inject = ['$scope'];

export default angular.module('core.header', [])
  .component('coreHeader', {
    restrict: 'E',
    template: template,
    controller: HeaderController,
    controllerAs: 'ctrl',
    bindings: {
      detail: '<'
    }
  })
  .name;